/**
* @author Jenny Windsperger, Stirling Pankow, Will Prew, Shane O'Malley-Potting
* @email jennifer.windsperger@my.uwrf.edu, stirling.pankow@my.uwrf.edu,
*        william.prew@my.uwrf.edu, shane.omalley-potting@my.uwrf.edu
* @date December 1st 2011
 */
package pongtests;

import static org.junit.Assert.*;

import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;

import cs343.Paddle;

public class PaddleTest {

	private static cs343.Paddle paddle1;
	private  cs343.Paddle paddle2;
	/**
	 * @throws java.lang.Exception
	 */
	@BeforeClass
	public static void setUpBeforeClass() throws Exception {
		paddle1 = new Paddle(20, 50, 425);
	}

	/**
	 * @throws java.lang.Exception
	 */
	@AfterClass
	public static void tearDownAfterClass() throws Exception {
	}

	/**
	 * @throws java.lang.Exception
	 */
	@Before
	public void setUp() throws Exception {
		paddle2 = new Paddle(20, 50, 425);

	}

	/**
	 * @throws java.lang.Exception
	 */
	@After
	public void tearDown() throws Exception {
		paddle2 = null;
	}

	/**
	 * Test method for {@link cs343.Paddle#move(int)}.
	 */
	@Test
	public final void testMove() {
		paddle2.move(5);
		assertEquals(paddle2.getPaddlePosition(), 430, 0 );
		paddle2.move(-10);
		assertEquals(paddle2.getPaddlePosition(), 420, 0);
		paddle2.move(100);
		assertEquals(paddle2.getPaddlePosition(), 520, 0);
		paddle2.move(0);
		assertEquals(paddle2.getPaddlePosition(), 520, 0);
		
	}

}
